-
Notifications
You must be signed in to change notification settings - Fork 714
configureCompiler: separate compiler vs ProgramDb #10993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes a lot of sense to me.
d68cb50
to
ecf8eb7
Compare
I will not be providing a test for this change, as I think the prior hacky solution was "good enough" to solve the issue with recompilation-checking. I discussed the design with @mpickering and I think the new approach makes a lot more sense than what was there before. |
ecf8eb7
to
efd7707
Compare
@mergify rebase |
✅ Branch has been successfully rebased |
efd7707
to
f87b776
Compare
This commit splits up the logic in configureCompiler into two parts: 1. Configuring the compiler proper, e.g. finding the location and version of GHC. 2. Creating a program database of attendant programs such as ghc-pkg, haddock, and build tools such as ar, ld. This is done using information about the compiler, such as its location on the filesystem and toolchain information from its settings file.
f87b776
to
72e2a58
Compare
This commit splits up the logic in configureCompiler into two parts:
ghc-pkg
,haddock
, and build tools such asar
,ld
. This is done using information about the compiler, such as its location on the filesystem and toolchain information from its settings file.The main goal is to avoid an issue in which we get the wrong program database from the cache we get from recompilation checking. However, it's not straightforward to trigger the bug, so I don't have a test at the moment. In practice, I expect this change to be invisible to users.
See Note [Caching the result of configuring the compiler] for an explanation of the problem and the design of the solution.
Template B: This PR does not modify behaviour or interface
E.g. the PR only touches documentation or tests, does refactorings, etc.
Include the following checklist in your PR: